home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 15059 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: ccnews.ncku.edu.tw!news
  2. From: next@eembox.ncku.edu.tw ()
  3. Newsgroups: comp.lang.c++
  4. Subject: Help: In MFC, how to enable Automation in thread ??
  5. Date: Wed, 03 Apr 1996 12:55:42 GMT
  6. Organization: 3D MIRACLE Lab
  7. Message-ID: <4jtsf5$kro@ccnews.ncku.edu.tw>
  8. NNTP-Posting-Host: 140.116.72.115
  9. X-Newsreader: Forte Free Agent v0.55
  10.  
  11.  
  12. Here are som facts in MFC:
  13.  
  14. (1). To enable OLE automation, create a CCmdTarget-derived class, then
  15. EnableAutomation() in constructor.
  16.  
  17. (2). To wrap a automation server, use ClassWizard to create a
  18. COleDispatchDriver-deriver class.
  19.  
  20. (3). To create a new thread (worker or user-interface), use
  21. AfxBeginThread().
  22.  
  23. Now, I use AfxBeginThread() to create a thread X, in this thread I use
  24. a COleDispatchDriver-derived class Y to invoke automation calls (i.e.,
  25. thread X is an automation client). But this doesn't work!!
  26.  
  27. This COleDispatchDriver-derived class Y works well in document class.
  28.  
  29. What's wrong with the thread X?? How to create a automation-enabled
  30. thread using AfxBeginThread()??
  31.  
  32. Please help me! Any suggestion will be very appreciated, thanx.
  33.  
  34.  
  35. =================================
  36. Wang, Hong-Ming
  37. Mirac Lab.
  38. next@eembox.ncku.edu.tw
  39. =================================
  40.  
  41.